<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

class NotifyMessageRequest extends FormRequest
{
    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'title'=>'required',
            'body'=>'required',
            'image'=>'required',
            'custom_tag'=>'required',
            'option'=>'required',
        ];
    }
    public function messages()
    {
        return [
           'title.required'=>':attribute 为必填选项',
           'body.required'=>':attribute 为必填选项',
           'image.required'=>':attribute 为必填选项',
           'custom_tag.required'=>':attribute 为必填选项',
           'option.required'=>':attribute 为必填选项',
        ];
        //return parent::messages(); // TODO: Change the autogenerated stub
    }

    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }
}
